package com.example.superyi.myteam.roomPro.dao;

import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Query;

import com.example.superyi.myteam.roomPro.entityPro.AuthorEntity;

import java.util.List;

@Dao
public interface AuthorEntityDao {
    /**
     * 根据发布者id获取其所有问题
     * @param id 发布者id
     * @return liveData，需要刷新的数据
     */
    @Query("SELECT * FROM AuthorEntity where questionAuthorId= :id")
    LiveData<List<AuthorEntity>> getOwnAllPro(String id);
}
